import {
    createRouter,
    // createWebHistory,
    createWebHashHistory
} from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/Login.vue')
    },
    {
        path: '/question',
        name: 'Question',
        component: () => import('../views/Question.vue')
    },
    {
        path: '/paper/:type/:id/:answers',
        name: 'Paper',
        component: () => import('../views/Question.vue')
    },
    {
        path: '/qlib/:id',
        name: 'QuestionLib',
        component: () => import('../views/QuestionLib.vue')
    },
    {
        path: '/administration',
        name: 'Administration',
        component: () => import('../views/Administration.vue')
    },
    {
        path: '/createpaper/:libId',
        name: 'CreatePaper',
        component: () => import('../views/CreatePaper.vue')
    },
]

const router = createRouter({
    // history: createWebHistory(),
    history: createWebHashHistory(),
    routes
})

export default router